<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 200px;
            height: 500px;
            perspective: 800px;
        }

        .box {
            width: 200px;
            height: 500px;
            background-color: skyblue;
            transform: rotateY(0deg);
            transform-style: preserve-3d;
            transition: transform 2s ease;
            text-align: center;
            color: yellow;
        }

        div:hover {
            transform: rotateY(180deg);
        }
    </style>
</head>

<body>
    <div>
        <div class="box">
            床前明月光，疑是地上霜。
            举头望明月，低头思故乡。
        </div>
    </div>
</body>
<script>
    var arr = [1, 2, 3, 4, 5]
    //forEach
    // arr.forEach((v,i,item)=>{
    //     console.log(v,i,item)

    // })
    //filter
    var brr = arr.filter((v, i, item) => {
        return v > 3
    })
    console.log(brr);
    //every
    var res = arr.every((v) => {
        return v > 0
    })
    console.log(res)
    //some
    var res1 = arr.some((v) => {
        return v > 5
    })
    console.log(res1)
    //find
    var res2 = arr.find((v) => {
        return v > 3
    })
    console.log(res2)
    //findIndex
    var res3 = arr.find((v) => {
        return v <= 2
    })
    console.log(res3)
    //map
    var res4 = arr.map((v) => {
        return v * v
    })
    console.log(res4)

    //reduce归并方法
    var res5=arr.reduce((cur,pre)=>{
        return cur+pre
    })
    console.log(res5)

    //数组去重
    var brr=[2,4,5,65,3,4,5,65,98,97,65,97]
</script>

</html>